import java.time.LocalTime;

public class Program_in_Pic3 {
    public static void main(String[] args) throws InterruptedException {
        LocalTime currentTime = LocalTime.now();
        int hour = currentTime.getHour();
        int minute = currentTime.getMinute();
        int second = currentTime.getSecond();
        MyTime myTime = new MyTime(hour, minute, second);
        while(true){
            System.out.print("\033[2k\r" + myTime);
            Thread.sleep(1000);
            myTime.incrementSecond();
        }
    }
}
